feat: surface backend-switch + fork on telegram and web#147
Merged
Conversation
Fills the UI gaps for the multi-backend + fork features:
- Telegram gained NEITHER provider-switch nor fork; add /provider (list
backends / switch the attached session) and /fork ([backend] optional)
which branches and auto-attaches to the fork so the next message goes
to the branch. Both in the command menu + descriptions.
- Web had the ProviderPicker (backend switch) but no fork; add a
ForkButton next to it — a plain fork on single-backend daemons, and a
'fork onto <backend>' dropdown on multi-backend ones ('continue this
conversation on codex'). Success merges the returned SessionInfo and
focuses the fork, same as create. HelpModal gains /fork.
Web tests: ForkButton plain fork (no providerId), fork-onto-backend
(providerId sent), and inline rejection. Telegram handlers mirror the
existing /model + /attach patterns. Daemon suite unchanged.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 83.11% 83.17% +0.06%
==========================================
Files 104 104
Lines 17864 17932 +68
==========================================
+ Hits 14847 14915 +68
Misses 3017 3017
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The telegram frontend's new `#handleProvider` and `#handleFork` handlers had no tests, dropping patch coverage below the 80% gate. Extend the existing telegram-flows harness (real JWT auth + stubbed bot + recording fake manager) with `providerIds()` and a `session.fork` case, and cover every branch: - /provider (no arg) lists backends with the first tagged default - /provider <id> switches the attached session's backend - /provider without an attachment prompts to /attach - /fork branches same-backend and auto-attaches to the branch - /fork <backend> continues on another backend in one step - /fork without an attachment prompts to /attach Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Surfaces two already-shipped daemon capabilities on the remaining UIs so every client can drive them, not just the TUI:
session.fork(from feat: session.fork — branch a conversation, optionally onto another backend #146) — branch a conversation into an independent session, optionally continuing it on another backend.session.set_provider) — on telegram, which had no way to switch backends at all.The TUI's matching
/forkcommand lands in a separate codeoid-ui PR (saucam/codeoid-ui#17), completing fork across all three UIs.Telegram
/provider— no arg lists the available backends;/provider <id>switches the attached session's backend./fork [backend]— forks the attached session (optionally onto another backend) and auto-attaches to the fork (detach parent → attach fork), mirroring/attach.setMyCommands).Web
ForkButtonsits next to the provider picker inSessionControls:⑃ forkbutton (branch, same backend).⑃ fork ▾dropdown: fork (same backend) plus a continue on section listing the other backends./forkadded to the help modal.Tests
ForkButton— plain fork sends noproviderId; fork-onto-backend sendsproviderId; inline rejection surfaced. (9 SessionControls tests pass.)tsc --noEmitclean; webtsc -b --noEmitclean.Rebased onto
mainafter #145/#146 merged, so this is a single UI-only commit.🤖 Generated with Claude Code